function Explosion (battle, type) {
	// Properties
	this.m_x = 0;
	this.m_y = 0;
	this.m_active = false;
	
	this.m_splashRadius = 0;
	this.m_damage = 0;
	
	
	
	var animationCount = 0;
	var animationStep = 0;
	
	var EXPLOSION_FRAME_NUMBER;
	var EXPLOSION_FRAME_SIZE_W;
	var EXPLOSION_FRAME_SIZE_H;
	var EXPLOSION_FRAME_LENGTH;
	
	var explosionImage;
	var explosionSource;
	
	this.SetType = function (type, damage, radius) {
		// Image
		if (type == 0)       {
			EXPLOSION_FRAME_NUMBER = 10; EXPLOSION_FRAME_LENGTH = 40;
			EXPLOSION_FRAME_SIZE_W = 150; EXPLOSION_FRAME_SIZE_H = 150;
		}
		else if (type == 1)  {
			EXPLOSION_FRAME_NUMBER = 15; EXPLOSION_FRAME_LENGTH = 50;
			EXPLOSION_FRAME_SIZE_W = 150; EXPLOSION_FRAME_SIZE_H = 150;
		}
		else if (type == 2)  {
			EXPLOSION_FRAME_NUMBER = 20; EXPLOSION_FRAME_LENGTH = 30;
			EXPLOSION_FRAME_SIZE_W = 150; EXPLOSION_FRAME_SIZE_H = 150;
		}
		else if (type == 3)  {
			EXPLOSION_FRAME_NUMBER = 20; EXPLOSION_FRAME_LENGTH = 30;
			EXPLOSION_FRAME_SIZE_W = 150; EXPLOSION_FRAME_SIZE_H = 150;
		}
		
		explosionImage = g_graphicEngine.LoadImage("Data/ActionPhase/Explosion/Explosion " + type + ".png");
		explosionSource = new Array();
		for (var i=0; i<EXPLOSION_FRAME_NUMBER ;i++) {
			var cx = i % 5;
			var cy = (i / 5) >> 0;
			explosionSource[i] = new SourceRect(explosionImage, cx * EXPLOSION_FRAME_SIZE_W, cy * EXPLOSION_FRAME_SIZE_H, EXPLOSION_FRAME_SIZE_W, EXPLOSION_FRAME_SIZE_H);
		}
		
		animationCount = 0;
		animationStep = 0;
		
		this.m_damage = damage;
		this.m_radius = radius;
	}
	
	
	if (type == null) type = 1;
	this.SetType (type);
	
	
	
	
	
	
	
	
	
	this.Start = function (x, y) {
		this.m_x = x;
		this.m_y = y;
		animationCount = 0;
		animationStep = 0;
		this.m_active = true;
		
		
		for (var i=0; i<battle.m_enemy.length; i++) {
			var tempEnemy = battle.m_enemy[i];
			if (Math.abs(this.m_x - (tempEnemy.m_x + MAP_TILE_SIZE * 0.5)) + Math.abs(this.m_y - (tempEnemy.m_y + MAP_TILE_SIZE * 0.5)) <= this.m_radius) {
				tempEnemy.TakeDamage (this.m_damage);
			}
		}
		
		for (var i=0; i<battle.m_penguin.length; i++) {
			var tempPenguin = battle.m_penguin[i];
			if (Math.abs(this.m_x - (tempPenguin.m_x + MAP_TILE_SIZE * 0.5)) + Math.abs(this.m_y - (tempPenguin.m_y + MAP_TILE_SIZE * 0.5)) <= this.m_radius) {
				tempPenguin.TakeDamage (this.m_damage);
			}
		}
	}
	
	this.Update = function () {
		if (this.m_active == true) {
			animationCount += g_deltaTime;
			if (animationCount >= EXPLOSION_FRAME_LENGTH) {
				animationCount -= EXPLOSION_FRAME_LENGTH;
				animationStep ++;
				if (animationStep >= EXPLOSION_FRAME_NUMBER) {
					this.m_active = false;
				}
			}
		}
	}
	
	this.Draw = function () {
		if (this.m_active == true) {
			g_graphicEngine.Draw (g_context, explosionSource[animationStep].m_id, explosionSource[animationStep].m_x, explosionSource[animationStep].m_y, explosionSource[animationStep].m_w, explosionSource[animationStep].m_h, this.m_x - ((EXPLOSION_FRAME_SIZE_W * 0.5) >> 0) + BATTLE_OFFSET_X, this.m_y - ((EXPLOSION_FRAME_SIZE_H * 0.5) >> 0) + BATTLE_OFFSET_X, EXPLOSION_FRAME_SIZE_W, EXPLOSION_FRAME_SIZE_H, 1, 0, 0, this.m_angle);
		}
	}
}